Create the function getInstance in the Register class. Return the singleton instance of a Register class using the register variable which was declared and initiated to null.
Complete the function getTotalBill in the editor below. The function must state what must be returned.
getTotalBill has the following parameter(s):
itemDetails: a key/value pair of string key and integer value
The register contains the list of items and their prices. In this exercise, the list of items and their prices are: